package jia.core.event;

import jia.core.flags.EventFlags;

// ====================================================
/**
 * @author Alec Lanter
 */
public class AbstractGameEvent implements GameEvent{
	protected long id;
	protected Object eventData;
	protected GameEvent nextEvent;
	protected EventFlags flags;
	protected boolean hasHappened = false;
	protected String encounterText;

	//====================================================
	/**
	 */
	public AbstractGameEvent(){
		flags = new EventFlags();
	}

	// ====================================================
	/**
	 * @see net.sf.jia.framework.event.GameEvent#getNextEvent()
	 */
	public GameEvent getNextEvent(){
		return nextEvent;
	}

	// ====================================================
	/**
	 * @see net.sf.jia.framework.event.GameEvent#setNextEvent(net.sf.jia.framework.event.GameEvent)
	 */
	public void setNextEvent(GameEvent evt){
		this.nextEvent = evt;
	}

	// ====================================================
	/**
	 * @see net.sf.jia.framework.event.GameEvent#getEventData()
	 */
	public Object getEventData(){
		return eventData;
	}

	// ====================================================
	/**
	 * @see net.sf.jia.framework.event.GameEvent#setEventData(java.lang.Object)
	 */
	public void setEventData(Object data){
		this.eventData = data;
	}

	//====================================================
	/**
	 * @see net.sf.jia.framework.event.GameEvent#getFlags()
	 */
	public EventFlags getFlags(){
		return flags;
	}

	public boolean isHasHappened(){
		return hasHappened;
	}

	public void setHasHappened(boolean hasHappened){
		this.hasHappened = hasHappened;
	}
	/**
	 * @see net.sf.jia.framework.event.GameEvent#setFlags(net.sf.jia.framework.flags.EventFlags)
	 */
	public void setFlags(EventFlags evtFlgs){
		this.flags = evtFlgs;
	}

	public String getEncounterText(){
		return encounterText;
	}

	public void setEncounterText(String encounterText){
		this.encounterText = encounterText;
	}
}